<template>
  <svg aria-hidden="true">
    <use :xlink:href="symbolId" :fill="color" :class="fillClass" />
  </svg>
</template>

<script setup>
import { computed } from 'vue'

const props = defineProps({
  // svg 名称
  name: {
    type: String,
    required: true
  },
  //   颜色
  color: {
    type: String
  },
  //   类名
  fillClass: {
    type: String
  }
})
const symbolId = computed(() => `#icon-${props.name}`)
</script>
<style scoped lang="scss"></style>
